* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #000;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

.player-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* 视频播放区域 */
.video-container {
  flex: 1;
  background: #000;
  position: relative;
  transition: flex 0.3s ease;
}

#video {
  position: absolute;
  width: 100%;
  height: 100%;
  border: none;
}

/* 信息面板 */
.toggle-btn {
  position: fixed;
  right: 0;
  top: 82px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  padding: 15px 8px;
  border-radius: 4px 0 0 4px;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 100;
}

.toggle-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.info-panel {
  position: fixed;
  right: -300px;
  top: 0;
  width: 300px;
  height: 100vh;
  background: #1a1a1a;
  border-left: 1px solid #333;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 99;
}

.info-panel.collapsed {
  right: 0;
}

.panel-header {
  padding: 15px;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.video-title {
  font-size: 18px;
  font-weight: bold;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.toggle-btn i {
  transition: transform 0.3s ease;
}

.info-panel.collapsed .toggle-btn i {
  transform: rotate(180deg);
}

/* 视频信息 */
.video-info {
  padding: 15px;
  border-bottom: 1px solid #333;
}

.info-item {
  color: #888;
  font-size: 14px;
}

/* 剧集列表 */
.episode-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-content: start;
}

.episode-item {
  height: 32px;
  line-height: 32px;
  background: #2a2a2a;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  min-width: 0;
  padding: 0 8px;
}

.episode-item:hover {
  background: #3a3a3a;
  transform: translateY(-1px);
}

.episode-item.active {
  background: #007bff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

/* 滚动条样式 */
.episode-list::-webkit-scrollbar {
  width: 6px;
}

.episode-list::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.episode-list::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 3px;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .player-container {
    flex-direction: column;
  }

  .video-container {
    height: 100vh;
    width: 100%;
  }

  .info-panel {
    bottom: -60vh;
    right: 0;
    width: 100%;
    height: 60vh;
    top: auto;
    transition: bottom 0.3s ease;
  }

  .info-panel.collapsed {
    bottom: 0;
  }

  .toggle-btn {
    top: auto;
    bottom: 60vh;
    right: 20px;
    transform: rotate(90deg);
    border-radius: 4px 4px 0 0;
  }

  .episode-list {
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    padding: 8px;
  }

  .episode-item {
    height: 28px;
    line-height: 28px;
    font-size: 12px;
    padding: 0 6px;
  }
}